require "migration_helpers"
class CreateNews < ActiveRecord::Migration
  extend MigrationHelpers
  def self.up
    create_table :news do |t|
      t.column :title, :string
      t.column :content, :text
      t.column :created_at, :datetime
      t.column :user_id, :integer
    end
    foreign_key(:news, :user_id, :users)
  end

  def self.down
    drop_table :news
  end
end
